
<form id="form" action="{url('mchid/reg')}">
<input id="id_card_copy" type="hidden" name="id_card_copy" />
<input id="id_card_national" type="hidden" name="id_card_national" />
<input id="store_entrance_pic" type="hidden" name="store_entrance_pic" />
<input id="indoor_pic" type="hidden" name="indoor_pic" />
<div class="titlebar"><i class="iconfont icon-list_icon"></i>小微商户信息 <span class="red fn-f12">门店门口照片/店内环境如没有请百度和去街上拍摄一个(照片上名字和门店名称行业保存一致)</span></div>
<table class="formtable">
    <tr><th>商户简称:</th><td><input datatype="*" class="input" type="text" name="merchant_shortname" /><span class="gray">云收银台显示</span></td></tr>
    <tr><th>门店名称:</th><td><input datatype="*" class="input w300" type="text" name="store_name" /></td></tr>
    <tr><th>详细地址:</th><td><input datatype="*" class="input w400" type="text" name="store_street" /></td></tr>
    <tr><th>手机号:</th><td>
        <input datatype="m" class="input w120" type="text" name="contact_phone" />
        <span class="gray">接收微信官方和云收银台电话验证</span>
    </td></tr>
    <tr><th>服务描述:</th><td>
        <select datatype="*" class="select w400" name="product_desc">
            <option value=""></option>
            <option value="餐饮">餐饮</option>
            <option value="线下零售">线下零售</option>
            <option value="居民生活服务">居民生活服务</option>
            <option value="休闲娱乐">休闲娱乐</option>
            <option value="交通出行">交通出行</option>
            <option value="其他">其他</option>
        </select>
    <td></tr>
    <tr><th>门店门口照片</th>
        <td>
            <div class="img-review select_img w250 h170 fn-tac gray" data="store_entrance_pic">门店门口照片</div>
            <div class="img-review select_img w250 h170 fn-tac gray" data="indoor_pic">店内环境照片</div>
        </td>
    </tr>
    <tr><th>店内环境照片</th><td></td></tr>
</table>
<div class="titlebar"><i class="iconfont icon-list_icon"></i> 身份证 <span class="red fn-f12">必须和开户行信息一致</span></div>
<table class="formtable">
    <tr><th>身份证姓名:</th><td><input datatype="*" class="input w300" type="text" name="id_card_name" /> <span></span></td></tr>
    <tr><th>身份证号码:</th><td><input datatype="idcard" class="input w300" type="text" name="id_card_number" /></td></tr>
    <tr><th>身份证有效期:</th><td>
        <input readonly placeholder="开始时间" class="input w160 ui-date" datatype="date" type="text" name="start_time" />
        <span class="blue">至</span> 
        <input placeholder="结束时间" class="input w160 ui-date" type="text" name="end_time" /> <span class="gray">结束日期为空是：<span class="red">长期</span></span>
    </td></tr>
    <tr><th>认证身份证</th>
        <td>
            <div class="img-review select_img w250 h170 fn-tac gray" data="id_card_copy">身份证正明</div>
            <div class="img-review select_img w250 h170 fn-tac gray" data="id_card_national">身份证背面(国徽)</div>
        </td>
    </tr>
</table>
<div class="titlebar"><i class="iconfont icon-list_icon"></i>开户行信息 <span class="red fn-f12">必须和身份证信息一致</span></div>
<table class="formtable">
    <tr><th>开户银行:</th><td>
        <select class="select w400" name="account_bank">
            <option value=""></option>
            <option value="工商银行">工商银行</option>
            <option value="交通银行">交通银行</option>
            <option value="招商银行">招商银行</option>
            <option value="民生银行">民生银行</option>
            <option value="中信银行">中信银行</option>
            <option value="浦发银行">浦发银行</option>
            <option value="兴业银行">兴业银行</option>
            <option value="光大银行">光大银行</option>
            <option value="广发银行">广发银行</option>
            <option value="平安银行">平安银行</option>
            <option value="北京银行">北京银行</option>
            <option value="华夏银行">华夏银行</option>
            <option value="农业银行">农业银行</option>
            <option value="建设银行">建设银行</option>
            <option value="中国银行">中国银行</option>
            <option value="邮政储蓄银行">邮政储蓄银行</option>
        </select>
    </td></tr>
    <tr><th>收款银行卡号:</th><td><input id="account_number" datatype="*" class="input w400" type="text" name="account_number" /></td></tr>
    <tr><th>开户所在城市:</th><td>
        <div id="distpicker">
            <select class="select province" datatype="*"></select>
            <select class="select city" datatype="*"></select>
            <select class="select district" datatype="*"></select>
        </div>
    </td></tr>
    <tr><th>开户地城市码:</th><td><input id="bank_address_code" datatype="n6-16" class="input w80" type="text" name="bank_address_code" />
        <button type="button" class="button get_address_code">读取城市码</button>
        <span class="gray fn-f12">非城市邮编或区号,<a href="https://pay.weixin.qq.com/wiki/doc/api/download/wx_cityno.zip" class="red">点击详细查询</a></span><br />
    </td></tr>
</table>
<div class="titlebar"></div>
<table class="formtable">
    <tr>
        <th></th>
        <td>
            <input type="submit" value="确 定" class="button submit button-blue" />
            <input type="reset" value="重 置" class="button button-blank"/>
        </td>
    </tr>
    </table>
</div>
</form>
<style type="text/css">.img-review{line-height: 170px}</style>
<script type="text/javascript">
Do('base','layer','form','city','date',function(){
    $('#form').isForm();
    $("#distpicker").distpicker({province: '---- 所在省 ----',city: '---- 所在市 ----',district: '---- 所在区 ----'});
    $(".get_address_code").click(function(){
        var province = $(".province").val(),city = $(".city").val(),district = $(".district").val();
        $.getJSON("{:url('mchid/bankAddressCode')}",{'province':province,'city':city,'district':district},function(rel){
            if(rel.code == '200'){
                $("#bank_address_code").val(rel.data)
            }else{
                parent.layer.msg(rel.msg,{icon:5,shade:0.5})
            }
        });
    })
    $(".select_img").click(function(){
        $(this).popup({'url':'{:url("system/passport.common/upload")}'});
        autoPlay();
    });
})
function autoPlay() {
    setInterval(function () {
        var card_copy = $("#id_card_copy").val(),card_national = $("#id_card_national").val(),store_entrance_pic = $("#store_entrance_pic").val(),indoor_pic = $("#indoor_pic").val();
        ""!=card_copy&&$("div[data='id_card_copy']").html('<img src="'+card_copy+'">');
        ""!=card_national&&$("div[data='id_card_national']").html('<img src="'+card_national+'">');
        ""!=store_entrance_pic&&$("div[data='store_entrance_pic']").html('<img src="'+store_entrance_pic+'">');
        ""!=indoor_pic&&$("div[data='indoor_pic']").html('<img src="'+indoor_pic+'">');
    },3000)
}
</script>